<template>
  <view class="qiuqian-info-wrapper" v-if="isShowMsg == 'Y'">
    <image
      class="my-bg"
      src="https://ai-sbbs.xyz/api/profile/upload/2024/07/01/216ecf4ef90549a1b0d6b8cd648786f9.png"
      mode="scaleToFill"
    />

    <view class="wrapper">
      <view class="item">
        <view class="left">公司名:</view>
        <view class="right">{{dataInfo.name}}</view>
      </view>

      <view class="item">
        <view class="left">公司名评分:</view>
        <view class="right" style="color:#f30;">{{dataInfo.description.score}}</view>
      </view>

      <view class="item">
        <view class="left">公司名简批:</view>
        <view class="right">{{dataInfo.description.title}}</view>
      </view>

      <view class="item">
        <view class="left">批注详解:</view>
        <view class="right">{{dataInfo.description.description}}</view>
      </view>

      <view class="item">
        <view class="left">公司名总批:</view>
        <view class="right">{{dataInfo.jixiong}}</view>
      </view>
    </view>
  </view>
</template>

<script>
import { yfggongsiApi } from "@/apis/qiuqian";
import showPage from '@/utils/showPage'

export default {
  mixins: [showPage],

  data() {
    return {
      surname: "",
      dataInfo: {}
    };
  },
  onLoad(opt) {
    this.surname = opt.name;
    this.init();
  },
  methods: {
    async init() {
      let { code, data } = await yfggongsiApi({
        name: this.surname
      });
      if (code == 1) {
        this.dataInfo = data;
      }
    }
  }
};
</script>

<style lang="scss">
.qiuqian-info-wrapper {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding: 12px;
  background: #f6f6f6;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  .my-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
  }

  .item {
    display: flex;

    padding: 8px 0;
    .left {
      color: #888;
      margin-right: 4px;
      flex: 0 0 90px;
    }
  }
}
</style>